package cn.source.zk.service.impl;

import cn.source.zk.domain.entity.Cxdz;
import cn.source.zk.mapper.ZkCxdzMapper;
import cn.source.zk.service.IZkCxdzService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@Slf4j
public class ZkCxdzServiceImpl implements IZkCxdzService {

    @Autowired
    private ZkCxdzMapper cxdzMapper;

    /**
     * 查询cxdz列表
     * @param cxdz
     * @return
     */
    public List<Cxdz> getList(Cxdz cxdz) {
        return cxdzMapper.getList(cxdz);
    }

    /**
     * 新增cxdz
     * @param cxdz
     * @return
     */
    public int add(Cxdz cxdz) {
        return cxdzMapper.add(cxdz);
    }

    /**
     * 编辑cxdz
     * @param cxdz
     * @return
     */
    public int edit(Cxdz cxdz) {
        log.info("cxdz参数：{}",cxdz);
        return cxdzMapper.edit(cxdz);
    }

    @Override
    public int removeBatch(List<String> tdGuids) {
        return cxdzMapper.removeBatch(tdGuids);
    }

    @Override
    public Cxdz getCxdzByNum(Long num) {
        return cxdzMapper.getCxdzByNum(num);
    }

    /**
     * 重置cxdz
     * @param cxdz
     * @return
     */
    public int refreshCxdz(Cxdz cxdz) {
        return cxdzMapper.refreshCxdz(cxdz);
    }
}
